package com.ss.android.article.base.feature.detail2.picgroup.view;

import android.os.Build;
import android.os.Build;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver;

final class d implements ViewTreeObserver.OnGlobalLayoutListener {
    private final PictureDetailLayout a;

    d(PictureDetailLayout arg1) {
        this.a = arg1;
    }

    public final void onGlobalLayout() {
        if(Build.VERSION.SDK_INT >= 16) {
            this.a.h.getViewTreeObserver().removeOnGlobalLayoutListener(((ViewTreeObserver.OnGlobalLayoutListener)this));
        }
        else {
            this.a.h.getViewTreeObserver().removeGlobalOnLayoutListener(((ViewTreeObserver.OnGlobalLayoutListener)this));
        }

        this.a.s = this.a.a.getMeasuredHeight();
        if(this.a.s - this.a.r > this.a.t) {
            this.a.a.setTranslationY(((float)(this.a.s - this.a.r)));
        }
        else {
            this.a.a.setTranslationY(0f);
        }
    }
}

